<template>
  <div>
      <div>
        账号：<input type="text" v-model="vercode"><br>
        密码：<input type="text" v-model="pwd">  <br>
        验证码：<input type="text" v-model="user_name"><span>{{ verify_num }}</span><button @click="verify_btn()">换一批</button><br>
        <router-link to="/home"> <button @click="register_btn()">登录</button></router-link> 
      </div>
  </div>
</template>

<script>
import {register_fun, verify_fun} from '@/utlis/https'
export default {
//   name:'',
  data() {
    return {
        verify_num:'',
        vercode:'',
        user_name:'',
        pwd:''
    }
  },
  mounted() {
     this.verify_btn()
  },
  methods: {
    verify_btn(){
        verify_fun()
        .then(val=>{
          console.log(val)  
        //   this.arr = val.data.data  
        //   this.btn_num = val.data.allpage   
        this.verify_num = val.msg
        })       
        .catch(e=>{     
          console.log(e)    
        })
    },
    register_btn(){
        register_fun({
            vercode:this.vercode,
            name:this.user_name,
            pwd:this.pwd
        })
        .then(val=>{
          console.log(val)  
        // this.verify_num = val.msg
        })       
        .catch(e=>{     
          console.log(e)    
        })
    }
     
  },
}
</script>
<style lang='less' scoped>

</style>